import Vue from 'vue'
import Router from 'vue-router'
// import HelloWorld from '@/components/HelloWorld'
import login from '@/components/login'
import home from '@/components/home'
import rule from '@/components/rule'
import introduction from '@/components/introduction'
import upload from '@/components/upload'
import admin from '@/components/admin'
import taskCheckDetail from '@/components/taskCheckDetail'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '*',
      redirect: to => {
        return '/'
      }
    },
    {
      path: '/',
      name: 'login',
      component: login
    },
    {
      path: '/home',
      name: 'home',
      component: home
    },
    {
      path: '/admin',
      name: 'admin',
      component: admin
    },
    {
      path: '/rule',
      name: 'rule',
      component: rule
    },
    {
      name: 'introduction',
      path: '/introduction/:id',
      component: introduction
    },
    {
      name: 'upload',
      path: '/upload/:id',
      component: upload
    },
    {
      name: 'taskCheckDetail',
      path: '/taskCheckDetail/:jobId/:groupId/:jobFinishedId',
      component: taskCheckDetail
    }
  ]
})
